package com.aiapphub.SystemCode.service.impl;

import com.aiapphub.SystemCode.dto.UploadLogDto;
import com.aiapphub.SystemCode.entity.UploadLog;
import com.aiapphub.SystemCode.mapper.UploadLogMapper;
import com.aiapphub.SystemCode.service.UploadLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UploadLogServiceImpl implements UploadLogService {

    @Autowired(required = false)
    private UploadLogMapper uploadLogMapper;

    @Override
    public void saveUploadLog(UploadLogDto uploadLogDto) {
        UploadLog uploadLog = new UploadLog();
        uploadLog.setId(uploadLogDto.getId());
        uploadLog.setFileName(uploadLogDto.getFileName());
        uploadLog.setUploadStatus(uploadLogDto.getUploadStatus());
        uploadLog.setUploadTime(uploadLogDto.getUploadTime());

        uploadLogMapper.insert(uploadLog);
    }
}